﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Smart
{
    public class DbCari : Tablo
    {
        public int Id { get; set; }
        public string Kodu { get; set; }
        public string Unvan1 { get; set; }
        public string Unvan2 { get; set; }
        public string VergiDairesi { get; set; }
        public string VergiNumarasi { get; set; }
        public int SaticiId { get; set; }
        public string IskontoKodu { get; set; }
        public byte FiyatNo { get; set; }
        public byte IskontoOrani { get; set; }
        public int Vade { get; set; }
        

        public DbCari()
        {
            this.TabloAdi = "TBL_CARI";
        }

        public override IEnumerable<string> BulkImport()
        {
            yield return "İndiriliyor...";
            string[] dt = BackOffice.Get.CariList(new DateTime(1900, 1, 1));
            yield return "indirildi.";
            foreach (string item in SqlCeClient.Get.importRows(this.TabloAdi, dt))
            {
                yield return item;
            }
            yield return "Tamamlandı";
        }

    }
}
